package com.docMan.utils;

import com.docMan.dao.pojo.DocFtp;
import com.docMan.service.DocFtpService;


public class FinalConfig {
	public static final String DANGAN_STATUS_UNLEND = "0";
	public static final Double DANGAN_INIT_CLICKCOUNT = 0.0;


	/**
	 * pdfת����swf�ļ��Ĺ��ߵ�ַ
	 */
	public static final String SWFTOOLS_PATH = "d:/Program Files (x86)/SWFTools/pdf2swf.exe ";

	public static final String SWF_FILE_URL_PATH = "/dangan/swfFile/";
	/**
	 * ftp���ر������ʱ·��
	 */
//	public static final String FTP_TEMP_DOWNLOAD_PATH = "e:/downFromFTP/";
	/**
	 * memcached ��������ַ
	 */
	public static final String MEMCACHED_ADDRESS = "127.0.0.1";
	/**
	 * memcahced �������˿�
	 */
	public static final String MEMCACHED_PORT = "11211";
	/**
	 * struts ���ϴ�·��
	 */
//	public static final String STRUTS_UPLOAD_PATH = "e:/upload/";

	public static final String PIC_SIZE_240_240 = "_240_240";

	/**
	 * �鿴pdf ��·��
	 */
	public static final String PDF_URL = "/dangan/webService/show/filePath/getTif/";
	/**
	 * ��ȡswf�ļ���·��
	 */
	public static final String SWF_URL = "/dangan/webService/show/filePath/getSwf/";

	public static final String JIANGBEI_FTP_URL = "20.14.0.73";
	public static final String JIANGBEI_FTP_USERNAME = "nbgtda";
	public static final String JIANGBEI_FTP_PASSWORD = "nbgt@123";



	public static final String SESSION_HUMANID = "humanId";
	public static final String SESSION_HUMANNAME = "humanName";
	/**
	 * 当前人员所在的部门
	 */
	public static final String SESSION_HUMAN_UNIT_ID="humanUnitID";
	/**
	 * 某个人员所在的仅次于顶级部门的次部门id
	 */
	public static final String SESSION_HUMAN_TOP_UNIT_ID="humanUnitTOPID";
	public static final String SESSION_ADMIN="admin";
	/**
	 * �û�����ӵ�еĽ�ɫid����
	 */
	public static final String SESSION_ROLEIDS = "roleids";
	public static final String SESSION_EDIT="edit";

	public static final String SESSION_HUMAN_IP = "ip";

	public static final String REDIRECT_URL = "redirectUrl";
	public static final String IS_REDIRECT = "isRedirect";
	public static final String URL="url";
	public static final int LOGIN_SUCCESS = 0;
	public static final int LOGIN_NO_USER = 1;
	public static final int LOGIN_PASSWORD_WRONG = 2;

	 
	public static final int FILE_MOVE_L2F = 1;
	public static final int FILE_MOVE_F2F = 2;

	/**
	 * ������ʱ�ļ��������ʱ����Ψһ���ļ���ǰ׺����Ϊ���ʵ��ļ����кܴ��������ͬ�ģ�������Ҫ�ļ��������
	 * 
	 * @param object
	 * @return
	 */
	public static String getfilePathPre(Object object) {
		String filePathPre = System.currentTimeMillis() + object.toString()
				+ '/';
		return filePathPre;
	}

	/**
	 * ���ش�ftp�����ļ���ŵ���ʱ�ļ���·��
	 * 
	 * @param object
	 * @return
	 */
	public static String getFtpDownloadLocalPath(Object object) {
		String fileLocalPath = FTP_TEMP_DOWNLOAD_PATH + getfilePathPre(object);
		return fileLocalPath;
	}

	/**
	 * 表示创建的文件在网盘中
	 */
	public static int FILE_IN_DISK=2;
	/**
	 * 表示创建的文件在文件夹中
	 */
	public static int FILE_IN_DIRECTORY=1;
	public static String SIZE_MB="MB";
	public static String SIZE_KB="KB";
	
	public static DocFtp docFtp=new DocFtp("20.14.0.73", "docMan/", "20.14.0.73", "nbgt@123", "nbgtda", 21);
//	public static DocFtp docFtp=new DocFtp("127.0.0.1", "", "127.0.0.1", "gqb101112", "admin", 211);
//	public static String disk="e";
	public static String getDisk(){
		return ProperiesUtils.getProperty("deployDisk");
	}
	public static String lucene_path=getDisk()+":\\lucene";
	public static final String FTP_TEMP_DOWNLOAD_PATH = getDisk()+":/downFromFTP/";
	public static final String STRUTS_UPLOAD_PATH = getDisk()+":/upload/";
	public static final String index_dir=getDisk()+":\\lucene";
	public static final String index_dir_test=getDisk()+":\\luceneOA";
	public static final String file_type_pdf="file_pdf_ico_d32";
	
	public static DocFtp getDocFtp(){
		DocFtpService docFtpService=(DocFtpService) SpringContextUtils.getObject("docFtpService");
		docFtp=docFtpService.getById(1);
		return docFtp;
	}
	/**
	 * 表示文件夹的显示范围是所有人可见的
	 */
	public static final String  DirectoryDisplayRange_ALL="0";
	/**
	 * 表示文件夹的显示范围是在文件夹所在部门
	 */
	public static final String DirectoryDisplayRange_UNIT="1";
	/**
	 * 表示文件夹的显示范围是自定义的，指定某几个人
	 */
	public static final String DirectoryDisplayRange_HUMANS="2";
	/**
	 * 表示不可以搜索
	 */
	public static final String searchable_range_not="-1";
	/**
	 * 表示可以被搜索切搜范围是全部 
	 */
	public static final String searchable_range_all="0";
	/**
	 * 表示可以被搜索，搜索范围是该部门人员，搜索时依赖于字段 unitId
	 */
	public static final String searchable_range_unit="1";
	/**
	 * 表示可以被搜索，搜索范围是指定的个别人员，依赖于 humanIds 字段
	 */
	public static final String searchable_range_humans="2";
	public static final String FTP_IP="ftp.url";
	public static final String FTP_USERNAME="ftp.username";
	public static final String FTP_PASSWORD="ftp.password";
	public static final String FTP_PORT="ftp.port";
	public static final String FILE_DOWNLOAD="下载";
	public static final String FILE_PREVIEW="预览";
	/**
	 * EXCEL WORD 转换后html的存放路径
	 */
	public static final String POI_OFFICE2HTML_PATH="view\\poihtml\\";
	
	public static final String POI_HTML=".html";
	
	public static final String POI_OFFICE2HTML_IMAGE_PATH="view\\poihtml\\images\\";
	/**
	 * 索引来自自己上传在ftp上的文件
	 */
	public static final String INDEX_FORM_UPLOAD="0";
	/**
	 * 索引来自于OA数据库中的数据
	 */
	public static final String INDEX_FORM_OA="1";
	
	public static final String INDEX_FROM_BOOK="2";
	
	public static final String INDEX_FROM_ALL="-1";
	/**
	 * PersonalDiskDir 表示该文件夹的类型是某用户的顶级文件夹，该用户的所有文件都放在该文件加下
	 */
	public static final int PersonalDiskDir=1;
	
	public static final String PersonalDirId="personalDirId";
	
	public static final String canCreatDir="canCreatDir";
	public static final String canUploadFile2Dir="canUploadFile2Dir";
	public static final String path_split="/";
	/**
	 * 表示现在登入用户是不是管理员,主要用来判断是不是可以在部门网盘下新建文件或文件夹
	 */
	public static final String is_admin="admin";
	public static final String searchType_all="0";
	public static final String searchType_title="1";
	public static final String searchType_wh="2";
	public static final String lwdw_b="国土资源部";
	public static final String lwdw_s="省国土资源厅";
	
	
	public static final String file_pdf="pdf";
	public static final String file_word="word";
	public static final String file_excel="excel";
	/**
	 * 表示文件收藏的来源
	 */
	public static final String collect_from_docMan="1";
	public static final String collect_from_oa="2";
}
